/*
 * UiConfig.h
 *
 *  Created on: 2012-10-17
 *      Author: yangentao@gmail.com
 */

#ifndef UICONFIG_H_
#define UICONFIG_H_

#include "headers.h"

//w:width, h:height, x:xpos, y:ypos
//m:margin, p:pading
enum DicIndex {
	dicNull,
	dicTabBarHeight,
	dicTabPageMargin,
	dicTabRadiusWidth,
	dicTabRadiusHeight,
	dicTabCloseBmpWidth,
	dicTabCloseBmpHeight,
	dicTabIconWidth,
	dicTabIconHeight,
	dicTabTextMargin,
	dicTabTextMaxWidth,
	dicTabTextMinWidth,
	dicCount
};

extern int _dic[];

enum ColorIndex {
	colorNull,
	coTabClose,
	coTabCloseHot,
	coTabCloseMask,
	coTabBorder,
	coTabBody,
	coTabBodySelect,
	coTabFocus,
	coTabFocusLight,
	colorCount
};

extern COLORREF _colors[];

HBITMAP getCloseBitmap(bool focus);

void initConfig();
void cleanConfig();

inline int dic(DicIndex index) {
	assert(index>dicNull && index<dicCount);
	return _dic[index];
}
inline int colour(ColorIndex index) {
	assert(index >colorNull && index <colorCount);
	return _colors[index];
}
#endif /* UICONFIG_H_ */
